<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>日志管理</title>
    <!--[if lt IE 9]>
    <script src="http://www.json.org/json2.js"></script>
    <![endif]-->
    <script type="text/javascript" src="../static/js/head.js"></script>
</head>
<body>
<section>
    <div>


        <div class="adp-content">
            <form action="" method="post" id="queryForm"></form>
            <table id="queryTable"></table>
        </div>

    </div>
</section>




</body>
</html>

<script type="text/javascript" src="../static/js/adp2.js"></script>
<script type="text/javascript">

    var levelList = ADP.SV("Log")("getAllLevel")().map(function (level) {
        return {key: level, value: level};
    });


    var queryform = $("#queryForm").adpForm({
        elem: [
            {
                type: "select",
                lable: "日志级别",
                name: "level",
                placeholder: "请输入内容",
                data: [{key:"",value:""}].concat(levelList)
            },
            {type: "date", lable: "开始日期", name: "startDate",format: "YYYY-MM-DD",istime:"false"},
            {type: "date", lable: "结束日期", name: "endDate", format: "YYYY-MM-DD",istime:"false"}
            ],
        button: [{type: "submit", lable: "查询", method: "queryTable", icon: 'query'},{type: "reset", lable: "重置",icon:"reset"}]
    });


    var adptable = $("#queryTable").adpTable({
        service: "Log",
        method: "list",
        enableCheckbox: true,
        columns: [
            {field: 'operater', title: '操作人', width: 180,align:"left"},
            {field: 'level', title: '日志级别', width: 100},
            {field: 'message', title: '日志' },
            {field: 'date', title: '时间',width: 250,align:"right"}



        ]
    });

    function queryTable(obj) {
//        ADP.msg(JSON.stringify(obj));
        adptable.load(obj);
    }




    queryTable(queryform.getData());// 查询表格

</script>